<?php

class Database_Connection {

    public $host;
    public $user;
    public $password;
    public $database_name;
    
    public $connection = FALSE;
    
    public function __construct($host, $user, $password, $database_name) {
        $this->host = $host;
        $this->user = $user;
        $this->password = $password;
        $this->database_name = $database_name;
    }
    
    function connect() {
        $this->connection = mysql_connect($this->host, $this->user, $this->password);
        $select_db = mysql_select_db($this->database_name);
        return $select_db && $this->connection != FALSE;
    }
    
}

?>
